<template>
	<view>
		<navbar title="提现明细"></navbar>
		<view class="detail-box">
			<view class="detail-list" v-for="(item, index) in list" :key="index">
				<view class="fa jcsb">
					<view class="fz32 fwb">提现到微信</view>
					<view class="fz40 fwb">{{item.money}}</view>
				</view>
				<view class="time-box fa jcsb">
					<view class="fz24 cl7">{{item.createTime}}</view>
					<view class="state state1" v-if="item.sate == 0">审核中</view>
					<view class="state state2" v-if="item.sate == 1">已提现</view>
					<view class="state state3" v-if="item.sate == 2">已拒绝</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				page: 1,
				count: 0,
				list: []
			};
		},
		onLoad() {
			this.getList()
		},
		onReachBottom() {
			if(this.list.length < this.count) {
				this.page++
				this.getList()
			}
		},
		methods: {
			getList() {
				this.api.withdrawListFunc().then(res => {
					if(res.code == 200) {
						this.page = res.total
						this.list = this.page == 1 ? res.rows : this.list.concat(res.rows)
					}
				})
			}
		}
	}
</script>
<style>
	page{
		background-color: #fff;
	}
</style>
<style lang="scss" scoped>
	.detail-box{
		padding: 0 28rpx;
		.detail-list{
			padding: 28rpx 0;
			border-bottom: 2rpx solid #eee;
			.time-box{
				margin-top: 10rpx;
			}
			.reason{
				margin-top: 12rpx;
				color: #FE2525;
			}
			.state{
				font-size: 24rpx;
			}
			.state1{
				color: #FC8F00;
			}
			.state2{
				color: #18C954;
			}
			.state3{
				color: #EE3C13;
			}
		}
	}
</style>
